import { app_request as request } from "@/utils/http";
export interface TrademarkListType {
    records: RecordList;
    total: number;
}
export type RecordList = RecordItem[]
export interface RecordItem {
    id: number;
    createTime: string;
    updateTime: string;
    tmName: string;
    logoUrl: string;
}
export interface reqtrademarkRecordItemType {
    id?: number;
    tmName: string;
    logoUrl: string;
}
export type reqtrademarkRecordType = reqtrademarkRecordItemType[]
export function reqTrademarkList(page: number, limit: number) {
    return request.get<null, TrademarkListType>(`/admin/product/baseTrademark/${page}/${limit}`)
}

// 添加品牌
export function reqaddTrademark({ logoUrl, tmName }: reqtrademarkRecordItemType) {
    return request.post<null, null>('/admin/product/baseTrademark/save', { logoUrl, tmName })
}
// 修改品牌
export function updataTradmarkl(upadtaInfo: reqtrademarkRecordItemType) {
    return request.put<null, null>('/admin/product/baseTrademark/update', upadtaInfo)
}
// 删除品牌
export function deltrademarkItem(id: number) {
    return request.delete<null, null>(`/admin/product/baseTrademark/remove/${id}`)
}